#ifndef __PROTOCOL_H_
#define __PROTOCOL_H_

typedef struct {
	int (*matchesRequest) (const BYTE* request, WORD requestLength);
	void (*buildResponse) (const BYTE* request, WORD requestLength, BYTE* response, WORD* responseLength);
} Protocol;

typedef enum {
	PARAM_BINARY,
	PARAM_DIGIT,
	PARAM_ALPHA,
	PARAM_ALNUM
} ProtocolParameterType;

#define PROTOCOL_FOOTER "\x0a"
#define PROTOCOL_PARAM_BEGIN "["
#define PROTOCOL_PARAM_END "]"

extern int isArgsCompatible(const BYTE* args, ProtocolParameterType type, int length);

#endif //__PROTOCOL_H_
